package com.taobao.api.request;

import java.util.List;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.TaobaoObject;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.internal.util.json.JSONWriter;
import com.taobao.api.response.CainiaoSmartdeliveryIGetResponse;

/**
 * TOP API: cainiao.smartdelivery.i.get request
 * 
 * @author top auto create
 * @since 1.0, 2019.01.25
 */
public class CainiaoSmartdeliveryIGetRequest extends BaseTaobaoRequest<CainiaoSmartdeliveryIGetResponse> {
	
	

	/** 
	* <a href="http:open.taobao.comdocsdoc.htm?treeId=319&articleId=106295&docType=1">智能发货引擎<a>批量请求参数
	 */
	private String smartDeliveryBatchRequest;

	public void setSmartDeliveryBatchRequest(String smartDeliveryBatchRequest) {
		this.smartDeliveryBatchRequest = smartDeliveryBatchRequest;
	}

	public void setSmartDeliveryBatchRequest(SmartDeliveryBatchRequest smartDeliveryBatchRequest) {
		this.smartDeliveryBatchRequest = new JSONWriter(false,true).write(smartDeliveryBatchRequest);
	}

	public String getSmartDeliveryBatchRequest() {
		return this.smartDeliveryBatchRequest;
	}

	public String getApiMethodName() {
		return "cainiao.smartdelivery.i.get";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("smart_delivery_batch_request", this.smartDeliveryBatchRequest);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<CainiaoSmartdeliveryIGetResponse> getResponseClass() {
		return CainiaoSmartdeliveryIGetResponse.class;
	}

	public void check() throws ApiRuleException {
	}
	
	/**
 * 发货地址信息
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class Address extends TaobaoObject {

	private static final long serialVersionUID = 2693475546976187978L;

	/**
		 * 市
		 */
		@ApiField("city")
		private String city;
		/**
		 * 详细地址
		 */
		@ApiField("detail")
		private String detail;
		/**
		 * 区
		 */
		@ApiField("district")
		private String district;
		/**
		 * 省
		 */
		@ApiField("province")
		private String province;
		/**
		 * 街道
		 */
		@ApiField("town")
		private String town;
	

	public String getCity() {
			return this.city;
		}
		public void setCity(String city) {
			this.city = city;
		}
		public String getDetail() {
			return this.detail;
		}
		public void setDetail(String detail) {
			this.detail = detail;
		}
		public String getDistrict() {
			return this.district;
		}
		public void setDistrict(String district) {
			this.district = district;
		}
		public String getProvince() {
			return this.province;
		}
		public void setProvince(String province) {
			this.province = province;
		}
		public String getTown() {
			return this.town;
		}
		public void setTown(String town) {
			this.town = town;
		}

}

	/**
 * 用户信息
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class UserInfo extends TaobaoObject {

	private static final long serialVersionUID = 8654253465617292346L;

	/**
		 * 发货地址信息
		 */
		@ApiField("address")
		private Address address;
		/**
		 * 手机号码
		 */
		@ApiField("mobile")
		private String mobile;
		/**
		 * 姓名
		 */
		@ApiField("name")
		private String name;
		/**
		 * 固定电话
		 */
		@ApiField("phone")
		private String phone;
		/**
		 * 仓库id
		 */
		@ApiField("warehouse_id")
		private Long warehouseId;
	

	public Address getAddress() {
			return this.address;
		}
		public void setAddress(Address address) {
			this.address = address;
		}
		public String getMobile() {
			return this.mobile;
		}
		public void setMobile(String mobile) {
			this.mobile = mobile;
		}
		public String getName() {
			return this.name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getPhone() {
			return this.phone;
		}
		public void setPhone(String phone) {
			this.phone = phone;
		}
		public Long getWarehouseId() {
			return this.warehouseId;
		}
		public void setWarehouseId(Long warehouseId) {
			this.warehouseId = warehouseId;
		}

}

	/**
 * 订单信息，数量限制100
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class TradeOrder extends TaobaoObject {

	private static final long serialVersionUID = 7821256845666842112L;

	/**
		 * 买家留言
		 */
		@ApiField("buyer_message")
		private String buyerMessage;
		/**
		 * 卖家备注
		 */
		@ApiField("seller_memo")
		private String sellerMemo;
		/**
		 * 订单号，特别注意：对于淘系订单，务必要传淘系订单号
		 */
		@ApiField("trade_order_id")
		private String tradeOrderId;
	

	public String getBuyerMessage() {
			return this.buyerMessage;
		}
		public void setBuyerMessage(String buyerMessage) {
			this.buyerMessage = buyerMessage;
		}
		public String getSellerMemo() {
			return this.sellerMemo;
		}
		public void setSellerMemo(String sellerMemo) {
			this.sellerMemo = sellerMemo;
		}
		public String getTradeOrderId() {
			return this.tradeOrderId;
		}
		public void setTradeOrderId(String tradeOrderId) {
			this.tradeOrderId = tradeOrderId;
		}

}

	/**
 * 订单信息
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class OrderInfo extends TaobaoObject {

	private static final long serialVersionUID = 5317747381371527727L;

	/**
		 * <a href="http:open.taobao.comdoc2detail.htm?spm=a219a.7629140.0.0.8cf9Nj&treeId=17&articleId=105085&docType=1#2">订单渠道平台编码<a>
		 */
		@ApiField("order_channel_type")
		private String orderChannelType;
		/**
		 * 订单信息，数量限制100
		 */
		@ApiListField("trade_order_list")
		@ApiField("trade_order")
		private List<TradeOrder> tradeOrderList;
	

	public String getOrderChannelType() {
			return this.orderChannelType;
		}
		public void setOrderChannelType(String orderChannelType) {
			this.orderChannelType = orderChannelType;
		}
		public List<TradeOrder> getTradeOrderList() {
			return this.tradeOrderList;
		}
		public void setTradeOrderList(List<TradeOrder> tradeOrderList) {
			this.tradeOrderList = tradeOrderList;
		}

}

	/**
 * 商品信息,数量限制为100
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class Item extends TaobaoObject {

	private static final long serialVersionUID = 4537727516188199869L;

	/**
		 * 商品编码
		 */
		@ApiField("code")
		private String code;
		/**
		 * 数量
		 */
		@ApiField("count")
		private Long count;
		/**
		 * 名称
		 */
		@ApiField("name")
		private String name;
	

	public String getCode() {
			return this.code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		public Long getCount() {
			return this.count;
		}
		public void setCount(Long count) {
			this.count = count;
		}
		public String getName() {
			return this.name;
		}
		public void setName(String name) {
			this.name = name;
		}

}

	/**
 * 包裹信息
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class PackageInfo extends TaobaoObject {

	private static final long serialVersionUID = 5347776261282273629L;

	/**
		 * 包裹id,拆合单使用，<a href="http:open.taobao.comdoc2detail.htm?spm=a219a.7629140.0.0.8cf9Nj&treeId=17&articleId=105085&docType=1#10">使用方式<a>
		 */
		@ApiField("id")
		private String id;
		/**
		 * 商品信息,数量限制为100
		 */
		@ApiListField("item_list")
		@ApiField("item")
		private List<Item> itemList;
		/**
		 * 体积，单位ml
		 */
		@ApiField("volume")
		private Long volume;
		/**
		 * 重量，单位g
		 */
		@ApiField("weight")
		private Long weight;
	

	public String getId() {
			return this.id;
		}
		public void setId(String id) {
			this.id = id;
		}
		public List<Item> getItemList() {
			return this.itemList;
		}
		public void setItemList(List<Item> itemList) {
			this.itemList = itemList;
		}
		public Long getVolume() {
			return this.volume;
		}
		public void setVolume(Long volume) {
			this.volume = volume;
		}
		public Long getWeight() {
			return this.weight;
		}
		public void setWeight(Long weight) {
			this.weight = weight;
		}

}

	/**
 * 交易订单信息，数量限制为10
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class TradeOrderInfo extends TaobaoObject {

	private static final long serialVersionUID = 1719947828553771632L;

	/**
		 * <a href="http:open.taobao.comdocsdoc.htm?docType=1&articleId=105086&treeId=17&platformId=17#6">请求ID<a>
		 */
		@ApiField("object_id")
		private String objectId;
		/**
		 * 订单信息
		 */
		@ApiField("order_info")
		private OrderInfo orderInfo;
		/**
		 * 包裹信息
		 */
		@ApiField("package_info")
		private PackageInfo packageInfo;
		/**
		 * 收件人信息
		 */
		@ApiField("recipient")
		private UserInfo recipient;
		/**
		 * 使用者ID<a href="http:open.taobao.comsupporthotProblemDetail.htm?spm=a219a.7386793.0.0.4mwx9s&id=244622&tagId=">获取方式<a>
		 */
		@ApiField("user_id")
		private Long userId;
	

	public String getObjectId() {
			return this.objectId;
		}
		public void setObjectId(String objectId) {
			this.objectId = objectId;
		}
		public OrderInfo getOrderInfo() {
			return this.orderInfo;
		}
		public void setOrderInfo(OrderInfo orderInfo) {
			this.orderInfo = orderInfo;
		}
		public PackageInfo getPackageInfo() {
			return this.packageInfo;
		}
		public void setPackageInfo(PackageInfo packageInfo) {
			this.packageInfo = packageInfo;
		}
		public UserInfo getRecipient() {
			return this.recipient;
		}
		public void setRecipient(UserInfo recipient) {
			this.recipient = recipient;
		}
		public Long getUserId() {
			return this.userId;
		}
		public void setUserId(Long userId) {
			this.userId = userId;
		}

}

	/**
 * <a href="http://open.taobao.com/docs/doc.htm?treeId=319&articleId=106295&docType=1">智能发货引擎</a>批量请求参数
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class SmartDeliveryBatchRequest extends TaobaoObject {

	private static final long serialVersionUID = 1236824749655636545L;

	/**
		 * 电子面单信息是否需要加密 true: 加密; false: 不加密
		 */
		@ApiField("need_encrypt")
		private Boolean needEncrypt;
		/**
		 * 用户信息
		 */
		@ApiField("sender")
		private UserInfo sender;
		/**
		 * 交易订单信息，数量限制为10
		 */
		@ApiListField("trade_order_info_list")
		@ApiField("trade_order_info")
		private List<TradeOrderInfo> tradeOrderInfoList;
	

	public Boolean getNeedEncrypt() {
			return this.needEncrypt;
		}
		public void setNeedEncrypt(Boolean needEncrypt) {
			this.needEncrypt = needEncrypt;
		}
		public UserInfo getSender() {
			return this.sender;
		}
		public void setSender(UserInfo sender) {
			this.sender = sender;
		}
		public List<TradeOrderInfo> getTradeOrderInfoList() {
			return this.tradeOrderInfoList;
		}
		public void setTradeOrderInfoList(List<TradeOrderInfo> tradeOrderInfoList) {
			this.tradeOrderInfoList = tradeOrderInfoList;
		}

}


}